cc.game.onStart = function () {
    if (!cc.sys.isNative && document.getElementById("pre_loading"))
        document.body.removeChild(document.getElementById("pre_loading"));
    cc.view.enableRetina(cc.sys.os === cc.sys.OS_IOS ? true : false);
    cc.view.adjustViewPort(true);
    var visibleFrame = cc.view.getFrameSize();
    if (visibleFrame.height / visibleFrame.width < g_winHeight / g_winWidth) {
        cc.view.setDesignResolutionSize(g_winWidth, g_winHeight, cc.ResolutionPolicy.EXACT_FIT);
    } else {
        g_winHeight = visibleFrame.height * g_winWidth / visibleFrame.width;
        cc.view.setDesignResolutionSize(g_winWidth, g_winHeight, cc.ResolutionPolicy.FIXED_WIDTH);
    }
    cc.view.resizeWithBrowserSize(true);
    cc.LoaderScene.preload(g_resources, function () {
        cc.director.runScene(new GameScene());
    }, this);
};
cc.game.run();